CREATE TABLE [dbo].[u_cui]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[cui] [int] NULL,
[idjurisdiccion] [int] NOT NULL,
[idJurisdiccionBAJA] [int] NULL,
[idLoteBAJA] [int] NULL,
[idSegmentoBAJA] [int] NULL,
[idSegmento] [int] NULL,
[idRegion] [int] NULL,
[direccion] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PGcompleta] [smallint] NOT NULL,
[F1completo] [smallint] NOT NULL,
[idLote] [int] NULL,
[idEstado] [int] NOT NULL,
[CambioEstado6] [int] NOT NULL,
[isAprobado] [int] NULL,
[nroCaja] [int] NULL,
[idAnexoS2_PC] [int] NULL,
[idAnexoS2_PA_4] [int] NULL,
[idAnexoS2_PA_3] [int] NULL,
[idAnexoS2_PA_2] [int] NULL,
[idAnexoS2_PA_1] [int] NULL,
[idAnexoS2_PA_EP] [int] NULL,
[idAnexoS2_PA0] [int] NULL,
[idAnexoS2_PAEP] [int] NULL,
[idAnexoS2_PA1] [int] NULL,
[idAnexoS2_PA2] [int] NULL,
[idAnexoS2_PA3] [int] NULL,
[idAnexoS2_PA4] [int] NULL,
[idAnexoS2_PA5] [int] NULL,
[idAnexoS2_PA6] [int] NULL,
[idAnexoS2_PA7] [int] NULL,
[idAnexoS2_PA8] [int] NULL,
[idAnexoS2_PA9] [int] NULL,
[anexoS2_Obs] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[localidadparaje] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[departamento] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[u_cui] ADD CONSTRAINT [PK_u_cui] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[u_cui] WITH NOCHECK ADD CONSTRAINT [FK_u_cui_u_jurisdiccion] FOREIGN KEY ([idjurisdiccion]) REFERENCES [dbo].[u_jurisdiccion] ([idJurisdiccion]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[u_cui] WITH NOCHECK ADD CONSTRAINT [FK_u_cui_u_jurisdiccion1] FOREIGN KEY ([idJurisdiccionBAJA]) REFERENCES [dbo].[u_jurisdiccion] ([idJurisdiccion]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[u_cui] WITH NOCHECK ADD CONSTRAINT [FK_u_cui_u_lote] FOREIGN KEY ([idLote]) REFERENCES [dbo].[u_lote] ([Id]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[u_cui] WITH NOCHECK ADD CONSTRAINT [FK_u_cui_u_segmento] FOREIGN KEY ([idSegmento]) REFERENCES [dbo].[u_segmento] ([Id]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[u_cui] WITH NOCHECK ADD CONSTRAINT [FK_u_cui_u_segmento1] FOREIGN KEY ([idSegmentoBAJA]) REFERENCES [dbo].[u_segmento] ([Id]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[u_cui] NOCHECK CONSTRAINT [FK_u_cui_u_jurisdiccion]
GO
ALTER TABLE [dbo].[u_cui] NOCHECK CONSTRAINT [FK_u_cui_u_jurisdiccion1]
GO
ALTER TABLE [dbo].[u_cui] NOCHECK CONSTRAINT [FK_u_cui_u_lote]
GO
ALTER TABLE [dbo].[u_cui] NOCHECK CONSTRAINT [FK_u_cui_u_segmento]
GO
ALTER TABLE [dbo].[u_cui] NOCHECK CONSTRAINT [FK_u_cui_u_segmento1]
GO
